package com.bamboo.framework.init;

import com.bamboo.utils.ReadProperties;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;

/**
 * 加载tomcat下*.properties配置文件
 */
@Component
public class InitProperties {
    Logger logger = Logger.getLogger(ReadProperties.class);
    private static ReadProperties propertiesReaderWrite;
    private static String[] propertiesList = {"bamboo-jdbc", "bamboo-redis"};

    public static synchronized ReadProperties getInstance() {
        if (null == propertiesReaderWrite) {
            propertiesReaderWrite = new ReadProperties();
        }
        return propertiesReaderWrite;
    }

    public InitProperties() {
        ReadProperties.readProperties(propertiesList);
    }

}